package com.scs.application.core.pdf.enums;

import lombok.Getter;

/**
 * @description: 间距模式
 */
public enum SpacingMode {
    NORMAL("normal", "正常间距"),
    NO_SPACING("no_spacing", "无间距");


    @Getter
    private String code;

    @Getter
    private String desc;

    SpacingMode(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SpacingMode of(String code) {
        switch (code) {
            case "normal":
                return SpacingMode.NORMAL;
            case "no_spacing":
                return SpacingMode.NO_SPACING;
            default:
                return SpacingMode.NORMAL;
        }
    }

}
